package com.beauty.dressing.module.mine.activity;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.beauty.dressing.R;
import com.beauty.dressing.common.base.BaseActivity;
import com.beauty.dressing.module.mine.adapter.OnlineServiceAdapter;
import com.beauty.dressing.module.mine.holder.OnlineServiceHeadHolder;

public class OnlineServiceActivity extends BaseActivity {
    private OnlineServiceAdapter onlineServiceAdapter;
    private OnlineServiceHeadHolder onlineServiceHeadHolder;
    private RecyclerView recyclerView;

    @Override
    public void setContentView() {
        setContentView(R.layout.common_recycler_has_title);
    }

    @Override
    public void findView() {
        TextView title_txt = findViewById(R.id.title_txt);
        title_txt.setText("在线客服");
        recyclerView = findViewById(R.id.recyclerView);
        findViewById(R.id.left_img_btn).setOnClickListener(this);
        recyclerView.setLayoutManager(new LinearLayoutManager(context));
        onlineServiceAdapter = new OnlineServiceAdapter(context);
        onlineServiceHeadHolder = new OnlineServiceHeadHolder(context, LayoutInflater.from(context), recyclerView);
        onlineServiceAdapter.addFooterView(onlineServiceHeadHolder.itemView);
        recyclerView.setAdapter(onlineServiceAdapter);


    }

    @Override
    public void initData() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.left_img_btn:
                this.finish();
                break;
        }
    }
}
